
n = 0
for i in range(2,101):
    flag = False
    for j in range(2,i):
        if i%j==0:
            flag = True
            break
    if flag:
        print(i,"是合数")
        n+=1
print("合数的个数为：",n)



# n = 0 # 用于保存合数的个数
# for i in range(2,101):
#     flag = False # 默认不是合数
#     for j in range(2,i-1): # 判断2到本身-1是否还有能被整除的数，有就是合数
#         if i % j == 0:
#             flag = True
#             break
#     if flag:
#         print(i)
#         n += 1
# print("合数的个数为：",n)
